<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>订单详情
			
		</h2>
	</div>
	<div class="cf">

    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<table class="">
    <thead>
        <tr>
		<th class="">商品名称</th>
		<th class="">单价</th>
		<th class="">数量</th>
		<th class="">类型</th>
		<th class="">金额</th>
		</tr>
    </thead>
    <tbody>
		<notempty name="order">
		<volist name="order.goods_list" id="vo">
		<tr>
           
			<td>{$vo.goods_name}</td>
			<td>{$vo.price}</td>
			<td>{$vo.number}</td>
			<td>{$vo.goods_type}</td>
			<td>{$vo.subtotal}</td>			
		</tr>
		
		</volist>
		
			
		<else/>
		<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
    <h4 class="text-warning" style="text-align:right;margin-top:15px;">
				订单金额：${$order.goods_amount}+{$order.use_score}积分
	</h4>
	</div>
	<div class="main-title">
		
	</div>
	<div class="table-responsive">
		
	  <table class="table">
	    	<tr class="info">
	    		<th colspan="4" aligin="center">订单信息</th>
	    	</tr>
	    	<tr>
	    		<th>订单号:</th>
	    		<td>{$order.order_no}</td>
	    		<th>订单状态</th>
	    		<td>
	    			<switch name="order.status">
	    				<case value="0">	
	    					未支付
	    				</case>
	    				<case value="1">	
	    					未发货
	    				</case>
	    				<case value="2">	
	    					已发货
	    				</case>
	    				<case value="3">	
	    					已完成
	    				</case>
	    			</switch>
	    		</td>
	    	</tr>
	    	<tr>
	    		<th>收货人:</th>
	    		<td>{$order.consignee}</td>
	    		<th>电话:</th>
	    		<td>{$order.mobile}</td>
	    	</tr>
	    	<tr>
	    		<th>地址:</th>
	    		<td colspan="3">{$order.province|get_district_name}{$order.city|get_district_name}{$order.district|get_district_name}{$order.community|get_district_name}{$order.address}</td>
	    		
	    	</tr>
	  </table>
	</div>
   	<div>
   		<a class="btn ajax-get" href="{:U('Order/setPaid',array('id'=>$order['id']))}">付款</a>
   		<a class="btn ajax-get" href="{:U('Order/deliver',array('id'=>$order['id']))}">发货</a>
   	</div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

	<script type="text/javascript">
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});
	//回车搜索
	$(".search-input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
    //导航高亮
    highlight_subnav('{:U('Order/index')}');
	</script>
</block>
